home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.7 KB | 101 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWNotifr.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWNOTIFR_H
- #define FWNOTIFR_H
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWINTERE_H
- #include "FWIntere.h"
- #endif
-
- #ifndef FWORDCOL_H
- #include "FWOrdCol.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Foward declarations
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CConnection;
- class FW_CLASS_ATTR FW_CNotification;
-
- //========================================================================================
- // CLASS FW_CPrivInterestConnectionPair
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CPrivInterestConnectionPair
- {
- public:
- FW_CPrivInterestConnectionPair();
- FW_CPrivInterestConnectionPair(const FW_CPrivInterestConnectionPair& pair);
- FW_CPrivInterestConnectionPair(FW_CConnection* connection,
- const FW_CInterest* interest);
- ~FW_CPrivInterestConnectionPair();
-
- FW_Boolean operator==(const FW_CPrivInterestConnectionPair& pair) const;
- FW_Boolean operator!=(const FW_CPrivInterestConnectionPair& pair) const;
- FW_CPrivInterestConnectionPair& operator=(const FW_CPrivInterestConnectionPair& pair);
-
- const FW_CInterest* GetInterest() const;
- FW_CConnection* GetConnection() const;
-
- private:
- const FW_CInterest* fInterest;
- FW_CConnection* fConnection;
- };
-
- inline const FW_CInterest* FW_CPrivInterestConnectionPair::GetInterest() const
- {
- return fInterest;
- }
-
- inline FW_CConnection* FW_CPrivInterestConnectionPair::GetConnection() const
- {
- return fConnection;
- }
-
- //========================================================================================
- // CLASS FW_MNotifier
- //========================================================================================
-
- class FW_CLASS_ATTR FW_MNotifier
- {
- public:
- FW_DECLARE_CLASS
-
- virtual ~ FW_MNotifier();
-
- virtual void Notify(const FW_CNotification ¬ification);
-
- virtual void AddConnection(FW_CConnection* connection,
- const FW_CInterest* interest);
- virtual void RemoveConnection(const FW_CConnection& connection,
- const FW_CInterest& interest);
-
- protected:
- FW_MNotifier();
-
- private:
- FW_CPrivOrderedCollection fInterestList;
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-